home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11610 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  816 b 

  1. Path: UCTVMS.UCT.AC.ZA!xander
  2. From: Xander <xander@uctvms.uct.ac.za>
  3. Newsgroups: comp.lang.c++
  4. Subject: spawnlp problem in VC 1.5
  5. Date: Fri, 15 Mar 1996 15:22:11 +0200
  6. Organization: University of Cape Town
  7. Message-ID: <Pine.PMDF.3.91.960315151412.547456582A-100000-100000@uctvms.uct.ac.za>
  8. NNTP-Posting-Host: uctvms.uct.ac.za
  9. Mime-Version: 1.0
  10. Content-Type: TEXT/PLAIN; charset=US-ASCII
  11.  
  12. Hi there
  13.  
  14. I seem to have a strange problem in VC 1.52 with the spawnlp command:
  15. sprintf(fname,"%s.dat",name);
  16. sprintf(xxx,"%s.exe",name);
  17. x = _spawnlp(_P_WAIT, xxx, xxx, "RATE", fname, NULL);
  18.  
  19. This always fails with a E2BIG error. If however I do this...
  20.  
  21. sprintf(xxx,"%s.exe RATE %s.dat",name,name);
  22. x = system(xxx);
  23.  
  24. This works!!! But this executes another command.com to work.
  25. Why does the _spawnlp not work???
  26.  
  27. Alex Goodman
  28.